//商品列表路由配置
const routers = [
    {
        path: '/list',
        meta: {
            title: '商品列表'
        },
        component: (resolve) => require(['./views/list.vue'], resolve)
    },
    {
        path: '/detailProduct/:id',
        meta: {
            title: '商品详情'
        },
        component: (resolve) => require(['./views/detailProduct.vue'], resolve)
    },
    {
        path: '/cart',
        meta: {
            title: '购物车'
        },
        component: (resolve) => require(['./views/cart.vue'], resolve)
    },
    // {
    //     path: '/personalInf',
    //     meta: {
    //         title: '个人页面'
    //     },
    //     component: (resolve) => require(['./views/personalInf.vue'], resolve)
    // },
    {
        path: '/login',
        meta: {
            title: '登录注册'
        },
        component: () => import('./views/login.vue')
    },
    {
        path: '/homepage',
        meta: {
            title: '主页'
        },
        component: () => import('./views/homepage.vue')
    },
    {
        path: '*',
        redirect: '/login'
    },
    {
        path: '/Home',
        component: () => import('./views/common/Home.vue'),
        children: [
            {
                path: '/personalInf',
                meta: {
                    title: '个人页面'
                },
                component: (resolve) => require(['./views/personalPage/personalInf.vue'], resolve)
            },
            {
                path: '/receivingAddress',
                meta: {
                    title: '收货地址'
                },
                component: (resolve) => require(['./views/personalPage/receivingAddress.vue'], resolve)
            },
        ]
    }
];
export default routers;
